#!wperl.exe -w
#
# S.Ox. /pci compliance for rdesktop users 
# Angelos Karageorgiou angelos@unix.gr Nov 2007 
# Major Rework Summer 2009
# 
# 
 

use common::sense;

package coliau;

our %keymap=(
	0x00 => 'unDef',	0x10 => 'SHIFT',		0x20 => ' ',
	0x01 => 'L_MOUSE',	0x11 => 'CTRL',			0x21 => 'PG_UP',
	0x02 => 'R_MOUSE',	0x12 => 'ALT',			0x22 => 'PG_DWN',
	0x03 => 'CTRLBRK',	0x13 => 'PAUSE',		0x23 => 'END',
	0x04 => 'M_MOUSE',	0x14 => 'CAPSLOCK',		0x24 => 'HOME',
	0x05 => 'X1_MOUSE',	0x15 => 'IME_Kana',		0x25 => 'LEFT',
	0x06 => 'X2_MOUSE',	0x16 => 'unDef',		0x26 => 'UP',
	0x07 => 'unDef',	0x17 => 'IME_Junja',	0x27 => 'RIGHT',
	0x08 => 'BKSPCE',	0x18 => 'IME_final',	0x28 => 'DOWN',
	0x09 => 'TAB',		0x19 => 'IME_Kanji',	0x29 => 'SELECT',
	0x0A => 'unDef',	0x1A => 'unDef',		0x2A => 'PRINT',
	0x0B => 'unDef',	0x1B => 'ESC',			0x2B => 'EXECUTE',
	0x0C => 'CLEAR',	0x1C => 'IME_cnvrt',	0x2C => 'PRTSCRN',
	0x0D => 'ENTER',	0x1D => 'IME_noncnvrt',	0x2D => 'INS',
	0x0E => 'unDef',	0x1E => 'IME_accept',	0x2E => 'DEL',
	0x0F => 'unDef',	0x1F => 'IME_modechng',	0x2F => 'HELP',

	0x30 => '0',		0x40 => 'unDef',	0x50 => 'P',	
	0x31 => '1',		0x41 => 'A',		0x51 => 'Q',
	0x32 => '2',		0x42 => 'B',		0x52 => 'R',
	0x33 => '3',		0x43 => 'C',		0x53 => 'S',
	0x34 => '4',		0x44 => 'D',		0x54 => 'T',
	0x35 => '5',		0x45 => 'E',		0x55 => 'U',
	0x36 => '6',		0x46 => 'F',		0x56 => 'V',
	0x37 => '7',		0x47 => 'G',		0x57 => 'W',
	0x38 => '8',		0x48 => 'H',		0x58 => 'X',
	0x39 => '9',		0x49 => 'I',		0x59 => 'Y',
	0x3A => 'unDef',	0x4A => 'J',		0x5A => 'Z',
	0x3B => 'unDef',	0x4B => 'K',		0x5B => 'L_WIN',
	0x3C => 'unDef',	0x4C => 'L',		0x5C => 'R_WIN',
	0x3D => 'unDef',	0x4D => 'M',		0x5D => 'App_key',
	0x3E => 'unDef',	0x4E => 'N',		0x5E => 'unDef',
	0x3F => 'unDef',	0x4F => 'O',		0x5F => 'SLEEP',

	0x60 => '0',		0x70 => 'F1',		0x80 => 'F17',	
	0x61 => '1',		0x71 => 'F2',		0x81 => 'F18',	
	0x62 => '2',		0x72 => 'F3',		0x82 => 'F19',	
	0x63 => '3',		0x73 => 'F4',		0x83 => 'F20',	
	0x64 => '4',		0x74 => 'F5',		0x84 => 'F21',	
	0x65 => '5',		0x75 => 'F6',		0x85 => 'F22',	
	0x66 => '6',		0x76 => 'F7',		0x86 => 'F23',	
	0x67 => '7',		0x77 => 'F8',		0x87 => 'F24',	
	0x68 => '8',		0x78 => 'F9',		0x88 => 'unDef',	
	0x69 => '9',		0x79 => 'F10',		0x89 => 'unDef',	
	0x6A => 'MULT',		0x7A => 'F11',		0x8A => 'unDef',	
	0x6B => 'ADD',		0x7B => 'F12',		0x8B => 'unDef',	
	0x6C => 'SEPRTR',	0x7C => 'F13',		0x8C => 'unDef',	
	0x6D => 'SUB',		0x7D => 'F14',		0x8D => 'unDef',	
	0x6E => 'DECMAL',	0x7E => 'F15',		0x8E => 'unDef',	
	0x6F => 'DIVIDE',	0x7F => 'F16',		0x8F => 'unDef',

	0x90 => 'NUMLOCK',	0xA0 => 'L_SHIFT',		0xB0 => 'Next_Track', 
	0x91 => 'SCRLOCK',	0xA1 => 'R_SHIFT',		0xB1 => 'Prev_Track',
	0x92 => 'unDef',	0xA2 => 'L_CTRL',		0xB2 => 'Stop_Media',
	0x93 => 'unDef',	0xA3 => 'R_CTRL',		0xB3 => 'Play/Pause_Media',
	0x94 => 'unDef',	0xA4 => 'L_MENU',		0xB4 => 'Start_Mail',
	0x95 => 'unDef',	0xA5 => 'R_MENU',		0xB5 => 'Select_Media',
	0x96 => 'unDef',	0xA6 => 'Brwsr_Back',	0xB6 => 'Start_App1',
	0x97 => 'unDef',	0xA7 => 'Brwsr_Forw',	0xB7 => 'Start_App2',
	0x98 => 'unDef',	0xA8 => 'Brwsr_Refrsh',	0xB8 => 'unDef',
	0x99 => 'unDef',	0xA9 => 'Brwsr_Stop',	0xB9 => 'unDef',
	0x9A => 'unDef',	0xAA => 'Brwsr_Search',	0xBA => ';:',
	0x9B => 'unDef',	0xAB => 'Brwsr_Favrts',	0xBB => '+',
	0x9C => 'unDef',	0xAC => 'Brwsr_Home',	0xBC => '=>',
	0x9D => 'unDef',	0xAD => 'Vlm_Mute',		0xBD => '-',
	0x9E => 'unDef',	0xAE => 'Vlm_Down',		0xBE => '.',
	0x9F => 'unDef',    0xAF => 'Vlm_Up',		0xBF => '/?',

	0xC0 => '`~',		0xD0 => 'unDef',	0xE0 => 'unDef',	0xF0 => 'unDef', 
	0xC1 => 'unDef',	0xD1 => 'unDef',	0xE1 => 'unDef',	0xF1 => 'unDef',
	0xC2 => 'unDef',	0xD2 => 'unDef',	0xE2 => 'unDef',	0xF2 => 'unDef',
	0xC3 => 'unDef',	0xD3 => 'unDef',	0xE3 => 'unDef',	0xF3 => 'unDef',
	0xC4 => 'unDef',	0xD4 => 'unDef',	0xE4 => 'unDef',	0xF4 => 'unDef',
	0xC5 => 'unDef',	0xD5 => 'unDef',	0xE5 => 'IME_PROCESS',	0xF5 => 'IME_PROCESS',
	0xC6 => 'unDef',	0xD6 => 'unDef',	0xE6 => 'unDef',	0xF6 => 'Attn',
	0xC7 => 'unDef',	0xD7 => 'unDef',	0xE7 => 'unDef',	0xF7 => 'CrSel',
	0xC8 => 'unDef',	0xD8 => 'unDef',	0xE8 => 'unDef',	0xF8 => 'ExSel',
	0xC9 => 'unDef',	0xD9 => 'unDef',	0xE9 => 'unDef',	0xF9 => 'Erase_EOF',
	0xCA => 'unDef',	0xDA => 'unDef',	0xEA => 'unDef',	0xFA => 'Play',
	0xCB => 'unDef',	0xDB => '[{',		0xEB => 'unDef',	0xFB => 'Zoom',
	0xCC => 'unDef',	0xDC => '\|',		0xEC => 'unDef',	0xFC => 'unDef',
	0xCD => 'unDef',	0xDD => ']}',		0xED => 'unDef',	0xFD => 'PA1',
	0xCE => 'unDef',	0xDE => '\'\"',		0xEE => 'unDef',	0xFE => 'Clear',
	0xCF => 'unDef',	0xDF => 'unDef',	0xEF => 'unDef',	0xFF => 'unDef',
);

1;
